<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8" />
<title>Hello React!</title>
<!-- <script src="https://cdn.staticfile.org/react/16.4.0/umd/react.development.js"></script>
<script src="https://cdn.staticfile.org/react-dom/16.4.0/umd/react-dom.development.js"></script>
<script src="https://cdn.staticfile.org/babel-standalone/6.26.0/babel.min.js"></script> -->
<script src="./react.development.js"></script>
<script src="./react-dom.development.js"></script>
<script src="./babel.min.js"></script>
<script src="./prop-types.js"></script>
</head>
<body>
<div id="example"></div>
<div id="example1"></div>
<div id="example2"></div>
<div id="example3"></div>
<script type="text/babel">
class App extends React.Component{
  render(){
		console.log(this.props.arr);
		let {arr} = this.props;
    return (
      <div>
				{
					arr.map((item,index)=>{
						return <Welcome name={item} key={index}/>
					})
				}
      </div>
    )
  }
}
function Welcome(props){
	console.log(this)//构造函数特点，this为undefined
	console.log(props)
  return <h2>Welcome {props.name}</h2>
}
let arr = [111,222,333];
ReactDOM.render(<App arr={arr}/>,document.getElementById('example'))
</script>
</body>
</html>